package com.mzkj.wanjulaile.mobile.api.modules.weChat.entity;

import com.mzkj.wanjulaile.mobile.api.common.config.Global;
import org.springframework.stereotype.Component;

/**
 * Copyright © 2016 上海美挚网络. All rights reserved.
 *
 * @Projec: meilein
 * @Package:in.meile.print.modules.mobile.constant
 * @Description:${todo}
 * @author:bing
 * @date:16/4/27 下午3:15
 * @version:V1.0
 */
@Component("wxConstant")
public class WxConstant {

    /**
     * 微信公众平台-基本配置参数:token
     */
    public static final String TOKEN = Global.getConfig("wx.token");
    /**
     * 微信公众平台-基本配置参数:EncodingAESKey
     */
    public static String AES_KEY = Global.getConfig("wx.aesKey");
    /**
     * 微信基本配置参数:appId
     */
    public static String APP_ID = Global.getConfig("wx.appId");
    /**
     * 微信基本配置参数:appSecret
     */
    public static String APP_SECRET = Global.getConfig("wx.appSecret");

    /**
     * 消息类型:文本消息
     */
    public static final String MESSAGE_TYPE_TEXT = "text";

    /**
     * 消息类型:音乐
     */
    public static final String MESSAGE_TYPE_MUSIC = "music";

    /**
     * 消息类型:图文
     */
    public static final String MESSAGE_TYPE_NEWS = "news";

    /**
     * 消息类型:图片
     */
    public static final String MESSAGE_TYPE_IMAGE = "image";

    /**
     * 消息类型:视频
     */
    public static final String MESSAGE_TYPE_VIDEO = "video";

    /**
     * 消息类型:小视频
     */
    public static final String MESSAGE_TYPE_SHORTVIDEO = "shortvideo";

    /**
     * 消息类型:链接
     */
    public static final String MESSAGE_TYPE_LINK = "link";

    /**
     * 消息类型:地理位置
     */
    public static final String MESSAGE_TYPE_LOCATION = "location";

    /**
     * 消息类型:音频
     */
    public static final String MESSAGE_TYPE_VOICE = "voice";

    /**
     * 消息类型:事件推送
     */
    public static final String MESSAGE_TYPE_EVENT = "event";

    /**
     * 事件类型:subscribe(订阅)
     */
    public static final String EVENT_TYPE_SUBSCRIBE = "subscribe";

    /**
     * 事件类型：unsubscribe(取消订阅)
     */
    public static final String EVENT_TYPE_UNSUBSCRIBE = "unsubscribe";

    /**
     * 事件类型：CLICK(自定义菜单点击事件)
     */
    public static final String EVENT_TYPE_CLICK = "CLICK";

    /**
     * 事件类型:scan(扫码)
     */
    public static final String EVENT_TYPE_SCAN = "SCAN";

    /**
     * 消息类型:转发客服
     */
    public static final String TRANSFER_CUSTOMER_SERVICE = "transfer_customer_service";
    /**
     * 缓存access_token的key值
     */
    public static final String ACCESS_TOKEN = "we_access_token";
    /**
     * 网页授权access_token
     */
    public static final String AUTH_ACCESS_TOKEN = "auth_access_token";
    /**
     * 缓存jsapi_ticket的key值
     */
    public static final String TICKET = "we_ticket";
    /**
     * ACCESS_TOKEN ename
     */
    public static final String ACCESS_TOKEN_ENAME = "access_token";

    /**
     * 主动发送消息url
     */
    public static final String SEND_MESSAGE_URL = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=";

    public static final String OAUTH_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + APP_ID + "&redirect_uri=DIST_REDIRECT_URI&response_type=code&scope=snsapi_base&state=1#wechat_redirect";
    public static final String TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";


    /**
     * 点击联系客服菜单
     */
    public static final String EVENT_KEY_KEFU = "CLICK_V_CONTACTUS";

    /**
     * 关于我们
     */
    public static final String EVENT_KEY_WITHUS = "CLICK_V_WITHUS";

    /**
     * 返回成功字符串
     */
    public static final String RETURN_SUCCESS = "SUCCESS";

    public static final String RESULT_SUCCESS = "SUCCESS";

    /**
     * 订单来源-微信端
     */
    public static final Integer SOURCE_TYPE_WECHAT = 1;

    /**
     * 确认方案图文消息图片
     */
    public static final String CONFIRM_PLAN_IMAGE = "http://mmbiz.qpic.cn/mmbiz/EM58FrWcXIdRdiayUbeWoibOmSnR1EahIGpFZMSiaLLiaWeZNMdrLZ3PSe5rGKFKyIV8dC2U35J3OrT3l7Rk0bktiag/0";

    /**
     * 微信模板消息请求接口url
     */
    public static final String TEMPLATE_MESSAGE_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=";

    /**
     * 微信关注推送文本
     */
    public static final String SUBSCRIBE_PUSH_MESSAGE = "欢迎关注玩具来了！\n玩具来了是国内领先的益智玩具租赁平台！\n启智早教专家针对宝宝不同发育阶段精选千款全球进口益智类玩具，全方位锻炼语言、协调、逻辑、情商、艺术、科学等能力。\n玩具品牌包含Fisher-Price、Lego、Hape、Step2、Thomas&Friends、Little Tiker、Vtech、Brio等" +
            "国际知名品牌。\n玩具发货前都会经过七道医疗级消毒流程，安全有保障，使用更安心！\n在互联网共享经济模式下，花一件玩具的钱玩十件，已成为新时代家庭的共同选择！\n现在还有新用户0元体验再送百元红包双重“豪”礼活动。";
}
